home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_02_05
/
2n05062b
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1991-03-25
|
385 b
|
32 lines
#include <stdio.h>
char s[40000];
int strlen(const char s[])
{
int i = 0;
while (s[i] != '\0')
++i;
#ifdef DEBUG
printf("%d\n", i);
#endif
return i;
}
int main(void)
{
unsigned i;
for (i = 0; i < 40000; ++i)
s[i] = 'x';
s[38000] = '\0';
printf("%u\n", strlen(s));
return 0;
}